home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
COMAL
/
T-COMAL Today
/
(k)t6.d64
/
joystick.proc
< prev
next >
Wrap
Text File
|
2007-02-28
|
448b
|
31 lines
9000 PROC JOYSTICK(P,REF D,REF F) CLOSED
9010 IF P=1 THEN
9020 M:=PEEK(56321)
9030 ELIF P=2 THEN
9040 M:=PEEK(56320)
9050 ELSE
9060 RETURN
9070 ENDIF
9080 F:=1-((M MOD 32) DIV 16)
9090 CASE 15-(M MOD 16) OF
9100 WHEN 1
9110 D:=1
9120 WHEN 2
9130 D:=5
9140 WHEN 4
9150 D:=7
9160 WHEN 5
9170 D:=8
9180 WHEN 6
9190 D:=6
9200 WHEN 8
9210 D:=3
9220 WHEN 9
9230 D:=2
9240 WHEN 10
9250 D:=4
9260 OTHERWISE
9270 D:=0
9280 ENDCASE
9290 ENDPROC JOYSTICK